package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller//相当于@Controller IOC注册bean类
@RequestMapping("/springmvc")
public class FirstController {
    @RequestMapping(value = "/firstController")
    public String sayHello(){
        System.out.println("访问FirstController");
        return "success";//自动拼接为/WEB-INF/pages/success.jsp
    }
}